package com.mhr.bike;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class location extends Activity implements View.OnClickListener{



    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_location);
        Button dejiButton= (Button) findViewById(R.id.deji);
        Button xuehuiButton= (Button) findViewById(R.id.xuehui);
        Button sihaiButton= (Button) findViewById(R.id.sihai);
        Button baichuanButton= (Button) findViewById(R.id.baichuan);
        Button tiyuButton= (Button) findViewById(R.id.tiyu);
        Button yangfanButton= (Button) findViewById(R.id.yangfan);
        Button yinghuaButton= (Button) findViewById(R.id.yinghua);
        Button tushuButton= (Button) findViewById(R.id.tushu);
        Button xiaomenButton= (Button) findViewById(R.id.xiaomen);
        Button zongheButton= (Button) findViewById(R.id.zonghe);
        dejiButton.setOnClickListener(this);
        xuehuiButton.setOnClickListener(this);
        sihaiButton.setOnClickListener(this);
        baichuanButton.setOnClickListener(this);
        tiyuButton.setOnClickListener(this);
        tushuButton.setOnClickListener(this);
        yangfanButton.setOnClickListener(this);
        yinghuaButton.setOnClickListener(this);
        xiaomenButton.setOnClickListener(this);
        zongheButton.setOnClickListener(this);


    }

    @Override
    public void onClick(View v) {
        Intent intent=null;
        switch (v.getId()){
            case R.id.deji:
                intent=new Intent(location.this,findmaps.class);
                intent.putExtra(findmaps.LOC,findmaps.deji);
                startActivity(intent);
                break;
            case  R.id.xuehui:
                intent=new Intent(location.this,findmaps.class);
                intent.putExtra(findmaps.LOC,findmaps.xuehui);
                startActivity(intent);
                break;
            case R.id.baichuan:
                intent=new Intent(location.this,findmaps.class);
                intent.putExtra(findmaps.LOC,findmaps.baichuan);
                startActivity(intent);
                break;
            case R.id.sihai:
                intent=new Intent(location.this,findmaps.class);
                intent.putExtra(findmaps.LOC,findmaps.sihai);
                startActivity(intent);
                break;
            case R.id.tiyu:
                intent=new Intent(location.this,findmaps.class);
                intent.putExtra(findmaps.LOC,findmaps.tiyu);
                startActivity(intent);
                break;
            case R.id.yangfan:
                intent=new Intent(location.this,findmaps.class);
                intent.putExtra(findmaps.LOC,findmaps.yangfan);
                startActivity(intent);
                break;
            case R.id.zonghe:
                intent=new Intent(location.this,findmaps.class);
                intent.putExtra(findmaps.LOC,findmaps.zonghe);
                startActivity(intent);
                break;
            case R.id.yinghua:
                intent=new Intent(location.this,findmaps.class);
                intent.putExtra(findmaps.LOC,findmaps.yinghua);
                startActivity(intent);
                break;
            case R.id.tushu:
                intent=new Intent(location.this,findmaps.class);
                intent.putExtra(findmaps.LOC,findmaps.tushu);
                startActivity(intent);
                break;
            case R.id.xiaomen:
                intent=new Intent(location.this,findmaps.class);
                intent.putExtra(findmaps.LOC,findmaps.xiaomen);
                startActivity(intent);
                break;
        }
    }
}